package com.yzt.zhuju.network.biz;

import com.alibaba.fastjson.JSONObject;
import com.yzt.zhuju.network.NetLayer;
import com.yzt.zhuju.network.apiconfig.SystemUrlConfig;

import rx.Observable;
import rx.Observer;

/**
 * author : bob
 * date   : 2022/12/6
 * desc   :
 */
public class SystemModule extends BaseModule {

    /**
     * 获取系统配置
     */
    public void getSysConfig(Observer observer) {
//        Observable observable = NetLayer.getInstance().getSystemService().getSysConfig();
//        toSubscribe2Filter(observable, observer, SystemUrlConfig.API_SYSTEM_GET_SYS_CONFIG);
    }

    /**
     * 阿里签名
     */
    public void getAliSign(Observer observer) {
        Observable observable = NetLayer.getInstance().getSystemService().getAliSign(getRequestBody(new JSONObject()));
        toSubscribe2Filter(observable, observer, SystemUrlConfig.API_GET_ALI_OSS);
    }


    /**
     * 获取系统配置新
     */
    public void loadAppSysConfig(Observer observer) {
        Observable observable = NetLayer.getInstance().getSystemService().loadAppSysConfig();
        toSubscribe2Filter(observable, observer, SystemUrlConfig.API_SYSTEM_LOAD_APP_SYS_CONFIG);
    }

    /**
     * 获取国家列表
     */
    public void getNationalList(Observer observer) {
        Observable observable = NetLayer.getInstance().getSystemService().getNationalList();
        toSubscribe2Filter(observable, observer, SystemUrlConfig.API_GET_APP_NATIONAL_LIST);
    }

    /**
     * 获取语言列表
     */
    public void getLanguageList(Observer observer) {
        Observable observable = NetLayer.getInstance().getSystemService().getLanguageList();
        toSubscribe2Filter(observable, observer, SystemUrlConfig.API_GET_APP_LANGUAGE_LIST);
    }
}
